package com.zcmob.web.admanagement.servlet;

import java.io.IOException;
import java.util.UUID;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class for Servlet: GotoAlipay
 *
 */
 public class GotoAlipay extends com.zcmob.web.admanagement.servlet.ZcMobServlet {
   static final long serialVersionUID = 1L;
   
    /* (non-Java-doc)
	 * @see javax.servlet.http.HttpServlet#HttpServlet()
	 */
	public GotoAlipay() {
		super();
	}

    @Override
    protected void handle(HttpServletRequest request, HttpServletResponse response) {
        
        String appid = request.getParameter("appid");
        
        String orderid = UUID.randomUUID().toString();
        
        request.setAttribute("appid", appid);
        request.setAttribute("orderid", orderid);
        
        RequestDispatcher rd = request.getRequestDispatcher("payment.jsp");
        try {
            rd.forward(request, response);
        } catch (ServletException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }   	 	  	  	    
}